<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ attribute name="context" required="true" type="java.lang.Object" %>
<%@ attribute name="session" required="true" type="net.muchine.web.front.session.UserSession" %>
<%@ attribute name="menus" required="false" type="java.lang.Object" %>
<%@ attribute name="sidebar" required="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="template" tagdir="/WEB-INF/tags/template" %>
<%@ taglib prefix="ui" tagdir="/WEB-INF/tags/ui" %>
<%@ taglib prefix="sidebar" tagdir="/WEB-INF/tags/sidebar" %>

<c:if test="${sidebar == null}">
	<c:set var="style" value="nosidebar"/>
</c:if>

<jsp:doBody var="body"/>
<div id="wrapper">
	<div id="wrapper2">
		<template:top context="${context}" session="${session}"/>
		<div class="${style}" id="main">
			<c:choose>
				<c:when test="${sidebar eq 'account'}">
					<sidebar:account context="${context}" session="${session}"/>
				</c:when>
				<c:when test="${sidebar eq 'admin'}">
					<sidebar:admin context="${context}" menus="${menus}"/>
				</c:when>
			</c:choose>
		    <div id="content">
		    	<ui:notice/>
		    	<ui:error/>
		    	${body}
		    </div>
		</div>	
		<template:footer/>
	</div>
</div>